Getting Started with Reports for WPF > Using the C1DX (C1D Open XML) File Format |
This release provides support for a new, OPC-based, file format for C1PrintDocument objects: C1DX. This new format complies with Microsoft Open Packaging Conventions, and is similar to the Office 2007 Open XML format. A C1DX file is a zip archive, with elements of that archive representing parts of the document. There are several advantages to the new format; the most obvious is that the resulting files are smaller in size due to built-in compression.
The following new types, properties, and methods have been added to support the new format:
Specifically, new overloads have been added to C1PrintDocument.Save, C1PrintDocument.Load, C1PrintDocument.FromFile, and C1PrintDocument.FromStream methods on C1PrintDocument:
Saves the current document to a stream using the specified format.
Saves the current document to a file using the specified format.
Loads the current document from a stream using the specified format.
Loads the current document from a file using the specified format.
All methods that load a document from a stream, or save the document to a stream without specifying the format, currently use the old C1D format.
All methods that load a document from a file, or save the document to a file without specifying the format, try to determine the correct format by the file extension, and if that fails (for example, the file has no extension) assume the old C1D format.
Note: The default format may change in the future, so it is better to explicitly specify the format. |